import {request} from "../utils/request";

// 实名认证
export async function realNameData(data){
	const res = await request({
		url:"/identity",
		method:"post",
		data
	}).catch()
	return res
}


//编辑用户信息
export async function auditUser(data) {
    const res = await request({
        url: `/wxapp/user`,
        method: 'PUT',
        data
    }).catch()
    return res
}

//获取用户详细信息
export async function getUser(id) {
    const res = await request({
        url: `/wxapp/user/${id}`,
        method: 'GET',
    }).catch()
    return res
}

//获取用户收藏的互娱师
export async function getUserSaveGamer(id) {
    const res = await request({
        url: `/wxapp/user/getSaveGamer/${id}`,
        method: 'GET',
    }).catch()
    return res
}

//获取用户收藏的商家
export async function getUserSaveBusiness(id) {
    const res = await request({
        url: `/wxapp/user/getSaveBusiness/${id}`,
        method: 'GET',
    }).catch()
    return res
}

//获取用户消费细明
export async function getUserDetailConsume(data) {
    const res = await request({
        url: `/detailConsume`,
        method: 'POST',
		data
    }).catch()
    return res
}

//消息推送
export async function putMsg(data) {
    const res = await request({
        url: `/msg/pushOneUser`,
        method: 'POST',
        data
    }).catch()
    return res
}
